package be.aquafin.klipdf.model.json;

import org.codehaus.jettison.json.JSONException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class JSONObject extends org.codehaus.jettison.json.JSONObject {
	private static final Logger logger = LoggerFactory.getLogger(JSONObject.class);
	private final org.codehaus.jettison.json.JSONObject jsonObject;

	public JSONObject() {
		this.jsonObject = new org.codehaus.jettison.json.JSONObject();
	}

	@Override
	public org.codehaus.jettison.json.JSONObject put(String key, Object value) {
		try {
			return this.jsonObject.put(key, value);
		} catch (JSONException e) {
			logger.error(e.getMessage());
		}
		return null;
	}
	
	@Override
	public String toString() {
		return this.jsonObject.toString();
	}
}
